package routes

import (
	"github.com/gin-gonic/gin"
	"video_08_28/internal/handler"
)

func LoadRouter(r *gin.Engine) {

	api := r.Group("/api")
	{
		api.POST("sendSms", handler.SendSms)

		user := api.Group("/user")
		{
			user.POST("register", handler.RegisterUser)
			user.POST("updateInfo", handler.UpdateUserInfo)
			user.GET("getInfo", handler.GetUserInfo)
		}

		video := api.Group("/video")
		{
			video.POST("add", handler.AddVideo)
			video.GET("findVideo", handler.FindVideo)
			video.GET("getVideo", handler.GetVideo)
		}
	}

	/*r.GET("/", func(c *gin.Context) {
		c.String(http.StatusOK, "hello World!")
	})*/
}
